package carclockpack;

import java.util.Calendar;

public class FinishedSetupState implements ClockSetupState {
    private ClockSetup clockSetup;
 
    public FinishedSetupState(ClockSetup clockSetup) {
        this.clockSetup = clockSetup;
    }
 
    public void previousValue() {
        System.out.println("Ignored...");
    }
 
    public void nextValue() {
        System.out.println("Ignored...");
    }
 
    public void selectValue() {
        Calendar selectedDate = clockSetup.getSelectedDate();
        System.out.println("Date set to: " + selectedDate.getTime());
    }
 
    public String getInstructions() {
        return "Press knob to view selected date...";
    }
 
    public int getSelectedValue() {
        throw new UnsupportedOperationException("Clock setup finished");
    }
}
